<%@page import="org.apache.commons.lang.StringUtils"%>
<%@page import="org.apache.commons.lang.time.DateFormatUtils"%>
<%@page import="org.springframework.util.CollectionUtils"%>
<%@page import="java.util.Collection"%>
<%@ include file="../common/common_include.jsp"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>

<%
	DestinForm form = (DestinForm)request.getAttribute("command");
	String tab = form.getTab();
	UserInfo user = (UserInfo)SecurityContextHolder.getContext().getAuthentication().getPrincipal();
	String userName = user.getName();
	String siteid = user.getSiteId();
%>


<div id="childLayout" class="easyui-layout" data-options="fit:true">
	<div data-options="region:'west',split:true,maxWidth:220,collapsible:true,style:{borderWidth:2},onResize:function(){XF.LAYOUT.resizeWest();}" style="background: #f7f7f9;width:220px;" title=" ">
		 <div class="sidebar">
			<div id="sidebar" class="easyui-accordion" style="width:auto;height:auto;"> 
			<sec:authorize ifAnyGranted="MANAGE_DESTIN,AUDIT_DESTIN"> 
				<div title="地址管理"  style="overflow:auto;padding:10px;">  
					<ul class="site-ul">
						<li class="site-li">
							<a s="addDestin" href="javascript:XF.Destin.addDestin()"><span>新增地址</span></a>
						</li>						
						<li class="site-li">
							<a s="listDestin" href="javascript:XF.Destin.listDestin('<%=user.getSiteId()+""%>')"><span>地址列表</span></a>
						</li>
						<li class="site-li">
							<a s="addExcelDestin" href="javascript:XF.Destin.addExcelDestin()"><span>批量上传</span></a>
						</li>
					</ul>
				</div>
			</sec:authorize>
			<sec:authorize ifAllGranted="MANAGE_DESTIN_ALL">
				<div title="地址全局管理"  style="overflow:auto;padding:10px;">  
					<ul class="site-ul">					
						<li class="site-li">
							<a s="listAllDestin" href="javascript:XF.Destin.listAllDestin()"><span>地址全局列表</span></a>
						</li>
					</ul>
				</div>			 
			</sec:authorize>
			<sec:authorize ifAllGranted="MANAGE_DESTIN_QUERY">
				<div title="查询目的地"  style="overflow:auto;padding:10px;">  
					<ul class="site-ul">					
						<li class="site-li">
							<a s="queryDestin" href="javascript:XF.Destin.queryDestin()"><span>查询目的地</span></a>
							<a s="queryExcelDestin" href="javascript:XF.Destin.queryExcelDestin()"><span>批量查询目的地</span></a>
						</li>
					</ul>
				</div>			 
			</sec:authorize>
			</div> 
		</div>
	</div>
	<div id="destinCenter" class="siteCenter" data-options="region:'center'">
	</div>
</div>
<script type="text/javascript">
	$(function(){
		$('#childLayout').layout();
		XF.NAV.activeTab('"<%=tab%>"');
	    $('#sidebar').accordion({
	        animate:true
	    });
	});
</script>
</html>